package com.gank.ct.util;
public class ToLowerAndUpper {

 private static String S = "ABCDEFG";
 private static String s = "abcdefg";
 
 public static char toLower(char ch)
 {
  if(ch <= 'Z' && ch >= 'A')
  {
   return (char)(ch-'A'+'a');
  }
  return ch;
 }
 
 public static char toUpper(char ch)
 {
  if(ch <= 'z' && ch >= 'a')
  {
   return (char)(ch-32);
  }
  return ch;
 }
 
 public static String toLower(String str)
 {
	 String newStr = "";
	  for(int i = 0; i < str.length(); i++)
		  newStr += toLower(str.charAt(i));
	  return newStr;
 }
 
 
 public static void main(String args[])
 {
    System.out.print(ToLowerAndUpper.toLower("ABCDEFG"));
 }
 
}